﻿#include "Work.h"
#include <QDebug>
#include "ForenoonState.h"

Work::Work() : m_hour(0), m_finish(false)
{
    m_current = shared_ptr<ForenoonState>(new ForenoonState());
}

void Work::WriteProgram()
{
    m_current->WriteProgram(make_shared<Work>(*this));
}

int Work::getHour() const
{
    return m_hour;
}

void Work::setHour(int hour)
{
    m_hour = hour;
}

bool Work::getFinish() const
{
    return m_finish;
}

void Work::setFinish(bool finish)
{
    m_finish = finish;
}

const shared_ptr<State> &Work::getCurrent() const
{
    return m_current;
}

void Work::setCurrent(const shared_ptr<State> &current)
{
    m_current = current;
}

